package com.passer.toolbox.common.core.util;

import com.amihaiemil.eoyaml.Yaml;
import com.amihaiemil.eoyaml.YamlMapping;

import java.io.IOException;
import java.io.InputStream;

public class YamlUtils {

    public static YamlMapping readYamlFile(String filename) throws IOException {
        InputStream resourceAsStream = YamlUtils.class.getResourceAsStream(filename);
        return Yaml.createYamlInput(resourceAsStream).readYamlMapping();
    }
}
